﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Pampa.CRUD.Configuration;
using Pampa.MVC.Fluent.Crud.Groups;

namespace Pampa.MVC.Fluent.Crud.Items
{
    public class ViewItemBuilder<TGroup, TEditor> : VisibleItemBuilder<TGroup, TEditor, object, ViewItemBuilder<TGroup, TEditor>>
    {
        private readonly ViewItem _item;

        public ViewItemBuilder(ViewItem item) : base(item)
        {
            _item = item;
        }

        public ViewItemBuilder(GroupBuilder<TGroup, TEditor> group, ViewItem item) : base(group, item)
        {
            _item = item;
        }

        public ViewItemBuilder<TGroup, TEditor> Format(string format)
        {
            _item.Format = format;
            return this;
        }
    }
}
